package com.example.design_pattern.mediator;

public class Client {

    public static void main(String[] args){
        Client client = new Client();
        client.test();
    }

    private void test(){
        Mediator mediator = new ConcretMediator();
        Colleague colleague1 = new Colleague1(mediator);
        Colleague colleague2 = new Colleague2(mediator);
        ((ConcretMediator) mediator).setmColleague1(colleague1);
        ((ConcretMediator) mediator).setmColleague2(colleague2);

        colleague1.changed();
        //colleague2.changed();
    }

}
